<?php include_once './application/views/sys_admin/common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once './application/views/sys_admin/common/account_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>商城管理</strong> &gt;&gt;  积分日志列表
		</div>
		<div class="admin_right_con">
			<table border="0" cellspacing="1" cellpadding="0" >
			  <tr style="color:#0068b7;">
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>日志编号</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>用户名</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>积分类型</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>变动类型</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>变动积分数值</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>备注</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>时间</strong></td>
			  </tr>
			   <?php foreach($list as $key=>$creditlog){?>
			  <tr>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $creditlog['id'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $creditlog['username'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $creditTypeName[$creditlog['type_id']];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $creditOpName[$creditlog['op']];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($creditlog['credit_value'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $creditlog['remark'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo date('Y-m-d H:i:s',$creditlog['add_time']);?></td>
			  </tr>
			  <?php }?>
			   <tr>
			  	<td colspan="8" bgcolor="#FFFFFF" height="35">
			  		<form id="searchForm" action="/sys_admin/credit/creditlog/" method="get">
			  			用户名：<input type="text" id="username" name="username" style="width: 100px;" value="<?php echo $username?>" />
			  			积分类型：<select id="type_id" name="type_id">
			  				<option value="0" <?php if($type_id==0){?>selected="selected"<?php }?>>所有</option>
			  				<?php foreach($creditTypeName as $key=>$value){?>
			  				<option value="<?php echo $key?>" <?php if($type_id==$key){?>selected="selected"<?php }?>><?php echo $value;?></option>
			  				<?php }?>
			  			</select>
			  			变动类型：<select id="op" name="op">
			  				<option value="0" <?php if($op==0){?>selected="selected"<?php }?>>所有</option>
			  				<?php foreach($creditOpName as $key=>$value){?>
			  				<option value="<?php echo $key?>" <?php if($op==$key){?>selected="selected"<?php }?>><?php echo $value;?></option>
			  				<?php }?>
			  			</select>
			  			开始时间：<input type="text" id="strtime" name="strtime" style="width: 100px;" value="<?php echo $strtime;?>"  onfocus="WdatePicker()" />
			  			结束时间：<input type="text" id="endtime" name="endtime" style="width: 100px;" value="<?php echo $endtime;?>"  onfocus="WdatePicker()" />
			  			<input type="submit" value="查询" />
			  		</form>
			  	</td>
			  </tr>
			  <tr>
			  	<td height="35"  colspan="8" align="right">
			  		<a href="/sys_admin/credit/creditlog_excle/?username=<?php echo $username;?>&type_id=<?php echo $type_id;?>&op=<?php echo $op;?>&strtime=<?php echo $strtime;?>&endtime=<?php echo $endtime;?>">导出数据</a></td>
			  </tr>
			  <tr>
			  	<td colspan="8"  height="35" align="center" valign="middle" bgcolor="#FFFFFF" class="page"><?php echo $this->pagination->create_links();?>共<?php echo $count;?>条记录</td>
			  </tr>
			
			</table>
			
			</div>
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
</body>
</html>
